// SysInit Unit
// Modular Support

(*************)
(* Interface *)
(*************)
{$IFDEF Include_Modules_Header}

 Type
  TModuleType = (mtUnknown, mtExe, mtDLL, mtPackage);

 // These fields should be immutable
 Function ModuleType: TModuleType;
 Function HInstance: NativeUInt;

{$ENDIF Include_Modules_Header}
(******************)
(* Implementation *)
(******************)
{$IFDEF Include_Modules_Implement}

 Var
  _INT_ModuleType: TModuleType = mtUnknown; { Type of module }
  _INT_HInstance: NativeUInt = 0;           { Handle of this instance }

 Function ModuleType: TModuleType;
  BEGIN
   Result:= _INT_ModuleType;
  END;

 Function HInstance: NativeUInt;
  BEGIN
   Result:= _INT_HInstance;
  END;

 Var
  _INT_Module: System.TLibModule = (
   Next: NIL;
   Instance: 0;
   ModuleInfo: NIL;
   RTLEx: @_INT_RTLExSlots;
  );

{$ENDIF Include_Modules_Implement}

